/* File name      :  iocommon.h
 * Author         :  Wentao Shang
 *
 * Contents       :
 *    This file contains the ioctl command definitions used by 
 *    the user when calling the ioctl() system call.
 *
 */

#ifndef IOCOMMON_H
#define IOCOMMON_H

#include <sys/ioctl.h>

/* device information */
#define MAJOR_NUM                   324
#define DEVICE_FILE_NAME            "/dev/nfivi"

/* ioctl operation commands */
#define IOCTL_SET_MOD               _IOW(MAJOR_NUM, 0, int)
#define IOCTL_GET_MOD               _IOR(MAJOR_NUM, 1, int)
#define IOCTL_SET_RES               _IOW(MAJOR_NUM, 2, int)
#define IOCTL_GET_RES               _IOR(MAJOR_NUM, 3, int)
#define IOCTL_SET_AUTOCONFIG        _IO(MAJOR_NUM, 4)
#define IOCTL_UNSET_AUTOCONFIG      _IO(MAJOR_NUM, 5)
#define IOCTL_SET_TIMEOUT           _IOW(MAJOR_NUM, 6, long)
#define IOCTL_GET_TIMEOUT           _IOR(MAJOR_NUM, 7, long)

/* ioctl error numbers */
#define EINPUT_TOO_LARGE            1001

#endif

